// layout
import Footer from "@/layout/footer/index.vue";
//import Header from "@/layout/header/index.vue";

//#endregion

const routes = [
    // {
    //   path: "/login",
    //   name: "login",
    //   meta: {
    //     title: "登录",
    //     isOpen: true,
    //   },
    //   component: () => import("@/views/login/index.vue"),
    // },
    {
        path: "/",
        name: "fotterMain",
        redirect: "/home",
        component: Footer,
        children: [{
                path: "home",
                name: "home",
                meta: {
                    title: "首页",
                    keepAlive: false
                },
                component: () =>
                    import ("@/views/Home.vue"),
            },
            {
                path: "/about",
                name: "About",
                meta: {
                    title: "个人中心",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "about" */ "../views/About.vue"),
            },
            {
                path: "/shop",
                name: "ShopHome",
                meta: {
                    title: "商城",
                    keepAlive: true,
                    scollTopPosition: 0
                },
                component: () =>
                    import ("../views/shop/ShopHome.vue"),
            },
            {
                path: '/goodsDetail',
                name: 'GoodsDetail',
                meta: {
                    title: "商品详情",
                    keepAlive: false
                },
                component: () =>
                    import ("../views/shop/goodsDetail.vue"),
            },
            {
                path: "/confirmOrder",
                name: "ConfirmOrder",
                meta: {
                    title: "确认订单",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "confirmOrder" */ "../views/order/confirmOrder.vue"),
            },
            {
                path: "/AfterSales",
                name: "AfterSales",
                meta: {
                    title: "申请退款",
                    keepAlive: true
                },
                component: () =>
                    import ( /* webpackChunkName: "ApplyAfterSales" */ "../views/order/ApplyAfterSales.vue"),
            },
            {
                path: "/orderList",
                name: "orderList",
                meta: {
                    title: "订单列表",
                    keepAlive: true
                },
                component: () =>
                    import ( /* webpackChunkName: "orderList" */ "../views/order/orderList.vue"),
            },
            {
                path: "/afterSalesList",
                name: "afterSalesList",
                meta: {
                    title: "退款/售后",
                    keepAlive: true
                },
                component: () =>
                    import ( /* webpackChunkName: "afterSalesList" */ "../views/order/afterSalesList.vue"),
            },
            {
                path: "/orderDetail",
                name: "OrderDetail",
                meta: {
                    title: "订单详情",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "orderDetail" */ "../views/order/orderDetail.vue"),
            },
            {
                path: "/refundOrderDetail",
                name: "refundOrderDetail",
                meta: {
                    title: "退款详情",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "refundOrderDetail" */ "../views/order/refundOrderDetail.vue"),
            },
            {
                path: "/balance",
                name: "balance",
                meta: {
                    title: "我的余额",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "balance" */ "../views/about/balance.vue"),
            },
            {
                path: "/withdrawal",
                name: "withdrawal",
                meta: {
                    title: "我的余额",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "withdrawal" */ "../views/about/withdrawal.vue"),
            },
            {
                path: "/enrollRecord",
                name: "EnrollRecord",
                meta: {
                    title: "报名记录",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "enrollRecord" */ "../views/about/enrollRecord.vue"),
            },
            {
                path: "/openingLive",
                name: "OpeningLive",
                meta: {
                    title: "申请账号",
                    keepAlive: false
                },
                component: () =>
                    import ( /* webpackChunkName: "openingLive" */ "../views/about/openingLive.vue"),
            },
            {
                path: "/myAddress",
                name: "MyAddress",
                meta: {
                    title: "我的收货地址",
                    keepAlive: false,
                    savedPosition: 0
                },
                component: () =>
                    import ("../views/address/addressList.vue"),
            },
            {
                path: "/addressEdit",
                name: "AddressEdit",
                meta: {
                    title: "编辑/修改收货地址",
                    keepAlive: false
                },
                component: () =>
                    import ("../views/address/addressEdit.vue"),
            },
            {
                path: "/paySuccess",
                name: "paySuccess",
                meta: {
                    title: "支付结果",
                    keepAlive: false
                },
                component: () =>
                    import ("@/components/paySuccess.vue"),
            },
            {
                path: "/applyAccount",
                name: "applyAccount",
                meta: {
                    title: "申请账号",
                    keepAlive: false
                },
                component: () =>
                    import ("@/views/applyAccount/applyAccount.vue"),
            }
        ],
    },
    {
        path: "/liveRoom",
        name: "liveRoom",
        meta: {
            title: "直播间",
        },
        component: () =>
            import ("@/views/live/LiveRoom.vue"),
    },
    {
        path: "/wxLogin",
        name: "wxLogin",
        meta: {
            title: "微信授权初始页",
        },
        component: () =>
            import ("@/components/wxLogin.vue"),
    },
    {
        path: "/wxAuth",
        name: "wxAuth",
        meta: {
            title: "授权拿code页",
        },
        component: () =>
            import ("@/components/wxAuth.vue"),
    },
    {
        path: "/redirect",
        name: "redirect",
        meta: {
            title: "Redirect demo",
            hideHeader: true,
            isOpen: true,
        },
        component: () =>
            import ("@/views/redirect/index.vue"),
    },
];

export default routes;